package com.algo.rpc.common;

import com.algo.rpc.server.ServiceProvider;

import java.io.Serializable;
import java.util.Arrays;

/**
 * rpc请求实体类
 */
public class RpcRequest implements Serializable {
    /**
     * 请求的id
     */
    private String requestId;

    /**
     * 访问的接口
     */
    private Class serviceInterfaceClass;

    /**
     * 访问的方法名称
     */
    private String methodName;

    /**
     * 参数类型
     */
    private Class[] parameterTypes;

    /**
     * 请求参数
     */
    private Object[] args;

    public String getRequestId() {
        return requestId;
    }

    public void setRequestId(String requestId) {
        this.requestId = requestId;
    }

    public Class getServiceInterfaceClass() {
        return serviceInterfaceClass;
    }

    public void setServiceInterfaceClass(Class serviceInterfaceClass) {
        this.serviceInterfaceClass = serviceInterfaceClass;
    }

    public String getMethodName() {
        return methodName;
    }

    public void setMethodName(String methodName) {
        this.methodName = methodName;
    }

    public Class[] getParameterTypes() {
        return parameterTypes;
    }

    public void setParameterTypes(Class[] parameterTypes) {
        this.parameterTypes = parameterTypes;
    }

    public Object[] getArgs() {
        return args;
    }

    public void setArgs(Object[] args) {
        this.args = args;
    }

    @Override
    public String toString() {
        return "RpcRequest{" +
                "requestId='" + requestId + '\'' +
                ", serviceInterfaceClass=" + serviceInterfaceClass +
                ", methodName='" + methodName + '\'' +
                ", parameterTypes=" + Arrays.toString(parameterTypes) +
                ", args=" + Arrays.toString(args) +
                '}';
    }
}



















